------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\ericzou\Dropbox\replicate_smokelabor/2_analysis/output_logs/table2.log
  log type:  text
 opened on:  22 Jun 2022, 17:34:15

.         
.         use "$Rep_smokelabor/1_build/regdata/county_quarter.dta", clear 

.         local tbl_settings_log format(%6.3f) parentheses(stderr) asterisk()

.         local tbl_settings_pmil format(%6.1f) parentheses(stderr) asterisk()

.         local append replace

.         local c = 1

.         
.         foreach var in cen2010_fracurb acs0716_pov100 acs0716_p50homeval acs0716_fracblack avg_pm25 {
  2.                 reghdfe d_pc_qwi_payroll c.hms_deep##c.up50_`var' [aw=seer_pop], a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
  3.                 summ pc_qwi_payroll [aw=seer_pop] if e(sample)
  4.                 local ymean=`r(mean)'
  5.                 regsave using "$Rep_smokelabor/2_analysis/output_tables/table2.dta", addlabel(outcome_mean, "`ymean'") table(col`c', `tbl_settings_log') `append'
  6.                 local append append
  7.                 local c = `c'+1
  8.         }
note: up50_cen2010_fracurb is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
(MWFE estimator converged in 5 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Gelbach & Miller applied.
note: up50_cen2010_fracurb omitted because of collinearity

HDFE Linear regression                            Number of obs   =    160,346
Absorbing 2 HDFE groups                           F(   2,   2519) =      39.96
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2431
                                                  Adj R-squared   =     0.1760
Number of clusters (countyfip) =      3,106       Within R-sq.    =     0.0038
Number of clusters (fe_stqtros) =      2,520      Root MSE        =   409.6524

                                    (Std. Err. adjusted for 2,520 clusters in countyfip fe_stqtros)
---------------------------------------------------------------------------------------------------
                                  |               Robust
                 d_pc_qwi_payroll |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
----------------------------------+----------------------------------------------------------------
                         hms_deep |  -5.975887   .6696253    -8.92   0.000    -7.288959   -4.662815
             up50_cen2010_fracurb |          0   2.59e-15     0.00   1.000    -5.08e-15    5.08e-15
                                  |
c.hms_deep#c.up50_cen2010_fracurb |   .8602792   .6311227     1.36   0.173    -.3772933    2.097852
                                  |
                            _cons |   166.3687   4.714003    35.29   0.000      157.125    175.6124
---------------------------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------+
    Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------+---------------------------------------|
 fe_countyqtroy |     12424       12424           0    *|
        fe_styr |       631           0         631     |
--------------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
pc_qwi_pay~l | 160,346  1.6164e+10    5359.656   3673.911   214.6878   84978.36
file C:\Users\ericzou\Dropbox\replicate_smokelabor/2_analysis/output_tables/table2.dta saved
note: up50_acs0716_pov100 is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
(MWFE estimator converged in 5 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Gelbach & Miller applied.
note: up50_acs0716_pov100 omitted because of collinearity

HDFE Linear regression                            Number of obs   =    160,346
Absorbing 2 HDFE groups                           F(   2,   2519) =      25.43
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2431
                                                  Adj R-squared   =     0.1760
Number of clusters (countyfip) =      3,106       Within R-sq.    =     0.0038
Number of clusters (fe_stqtros) =      2,520      Root MSE        =   409.6543

                                   (Std. Err. adjusted for 2,520 clusters in countyfip fe_stqtros)
--------------------------------------------------------------------------------------------------
                                 |               Robust
                d_pc_qwi_payroll |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
---------------------------------+----------------------------------------------------------------
                        hms_deep |  -5.365665   .9869428    -5.44   0.000    -7.300967   -3.430363
             up50_acs0716_pov100 |          0   3.20e-15     0.00   1.000    -6.27e-15    6.27e-15
                                 |
c.hms_deep#c.up50_acs0716_pov100 |   .3433239   .8855528     0.39   0.698    -1.393162     2.07981
                                 |
                           _cons |   166.3869   4.723891    35.22   0.000     157.1238      175.65
--------------------------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------+
    Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------+---------------------------------------|
 fe_countyqtroy |     12424       12424           0    *|
        fe_styr |       631           0         631     |
--------------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
pc_qwi_pay~l | 160,346  1.6164e+10    5359.656   3673.911   214.6878   84978.36
file C:\Users\ericzou\Dropbox\replicate_smokelabor/2_analysis/output_tables/table2.dta saved
note: up50_acs0716_p50homeval is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
(MWFE estimator converged in 5 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Gelbach & Miller applied.
note: up50_acs0716_p50homeval omitted because of collinearity

HDFE Linear regression                            Number of obs   =    160,346
Absorbing 2 HDFE groups                           F(   2,   2519) =      29.51
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2431
                                                  Adj R-squared   =     0.1760
Number of clusters (countyfip) =      3,106       Within R-sq.    =     0.0038
Number of clusters (fe_stqtros) =      2,520      Root MSE        =   409.6528

                                       (Std. Err. adjusted for 2,520 clusters in countyfip fe_stqtros)
------------------------------------------------------------------------------------------------------
                                     |               Robust
                    d_pc_qwi_payroll |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------------------------------+----------------------------------------------------------------
                            hms_deep |  -5.749027   .7703744    -7.46   0.000    -7.259659   -4.238395
             up50_acs0716_p50homeval |          0   2.37e-15     0.00   1.000    -4.65e-15    4.65e-15
                                     |
c.hms_deep#c.up50_acs0716_p50homeval |   .6577265     .69708     0.94   0.345    -.7091819    2.024635
                                     |
                               _cons |   166.3461   4.726198    35.20   0.000     157.0784    175.6137
------------------------------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------+
    Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------+---------------------------------------|
 fe_countyqtroy |     12424       12424           0    *|
        fe_styr |       631           0         631     |
--------------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
pc_qwi_pay~l | 160,346  1.6164e+10    5359.656   3673.911   214.6878   84978.36
file C:\Users\ericzou\Dropbox\replicate_smokelabor/2_analysis/output_tables/table2.dta saved
note: up50_acs0716_fracblack is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
(MWFE estimator converged in 5 iterations)
note: up50_acs0716_fracblack omitted because of collinearity

HDFE Linear regression                            Number of obs   =    160,346
Absorbing 2 HDFE groups                           F(   2,   2519) =      45.37
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2433
                                                  Adj R-squared   =     0.1762
Number of clusters (countyfip) =      3,106       Within R-sq.    =     0.0041
Number of clusters (fe_stqtros) =      2,520      Root MSE        =   409.6059

                                      (Std. Err. adjusted for 2,520 clusters in countyfip fe_stqtros)
-----------------------------------------------------------------------------------------------------
                                    |               Robust
                   d_pc_qwi_payroll |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
------------------------------------+----------------------------------------------------------------
                           hms_deep |  -4.095047   1.048591    -3.91   0.000    -6.151236   -2.038857
             up50_acs0716_fracblack |          0  (omitted)
                                    |
c.hms_deep#c.up50_acs0716_fracblack |  -2.414183    .980255    -2.46   0.014    -4.336371   -.4919948
                                    |
                              _cons |   166.6962   4.576035    36.43   0.000      157.723    175.6694
-----------------------------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------+
    Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------+---------------------------------------|
 fe_countyqtroy |     12424       12424           0    *|
        fe_styr |       631           0         631     |
--------------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
pc_qwi_pay~l | 160,346  1.6164e+10    5359.656   3673.911   214.6878   84978.36
file C:\Users\ericzou\Dropbox\replicate_smokelabor/2_analysis/output_tables/table2.dta saved
note: up50_avg_pm25 is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
(MWFE estimator converged in 5 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Gelbach & Miller applied.
note: up50_avg_pm25 omitted because of collinearity

HDFE Linear regression                            Number of obs   =     89,020
Absorbing 2 HDFE groups                           F(   2,   1724) =      21.55
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.3169
                                                  Adj R-squared   =     0.2537
Number of clusters (countyfip) =      1,725       Within R-sq.    =     0.0056
Number of clusters (fe_stqtros) =      2,520      Root MSE        =   355.3760

                             (Std. Err. adjusted for 1,725 clusters in countyfip fe_stqtros)
--------------------------------------------------------------------------------------------
                           |               Robust
          d_pc_qwi_payroll |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
---------------------------+----------------------------------------------------------------
                  hms_deep |  -6.524275   1.180642    -5.53   0.000    -8.839917   -4.208634
             up50_avg_pm25 |          0   6.16e-15     0.00   1.000    -1.21e-14    1.21e-14
                           |
c.hms_deep#c.up50_avg_pm25 |   1.778252   1.179766     1.51   0.132    -.5356707    4.092175
                           |
                     _cons |   173.6192   4.982926    34.84   0.000      163.846    183.3924
--------------------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------+
    Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------+---------------------------------------|
 fe_countyqtroy |      6900        6900           0    *|
        fe_styr |       631           0         631     |
--------------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
pc_qwi_pay~l |  89,020  1.4686e+10    5587.139   3750.851   534.9928   62888.39
file C:\Users\ericzou\Dropbox\replicate_smokelabor/2_analysis/output_tables/table2.dta saved

.         reghdfe d_pc_qwi_payroll c.hms_deep##c.up50_* [aw=seer_pop], a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
note: up50_cen2010_fracurb is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
note: up50_acs0716_pov100 is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
note: up50_acs0716_p50homeval is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
note: up50_acs0716_fracblack is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
note: up50_avg_pm25 is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
(MWFE estimator converged in 5 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Gelbach & Miller applied.
note: up50_cen2010_fracurb omitted because of collinearity
note: up50_acs0716_pov100 omitted because of collinearity
note: up50_acs0716_p50homeval omitted because of collinearity
note: up50_acs0716_fracblack omitted because of collinearity
note: up50_avg_pm25 omitted because of collinearity

HDFE Linear regression                            Number of obs   =     89,020
Absorbing 2 HDFE groups                           F(   6,   1724) =      21.88
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.3172
                                                  Adj R-squared   =     0.2540
Number of clusters (countyfip) =      1,725       Within R-sq.    =     0.0060
Number of clusters (fe_stqtros) =      2,520      Root MSE        =   355.3036

                                       (Std. Err. adjusted for 1,725 clusters in countyfip fe_stqtros)
------------------------------------------------------------------------------------------------------
                                     |               Robust
                    d_pc_qwi_payroll |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------------------------------+----------------------------------------------------------------
                            hms_deep |  -6.793868   1.615739    -4.20   0.000    -9.962884   -3.624853
                up50_cen2010_fracurb |          0   2.29e-07     0.00   1.000    -4.49e-07    4.49e-07
                 up50_acs0716_pov100 |          0   3.21e-08     0.00   1.000    -6.31e-08    6.31e-08
             up50_acs0716_p50homeval |          0   9.51e-08     0.00   1.000    -1.86e-07    1.86e-07
              up50_acs0716_fracblack |          0   3.45e-08     0.00   1.000    -6.77e-08    6.77e-08
                       up50_avg_pm25 |          0   1.21e-08     0.00   1.000    -2.37e-08    2.37e-08
                                     |
   c.hms_deep#c.up50_cen2010_fracurb |   1.244451   .6880178     1.81   0.071     -.104986    2.593889
                                     |
    c.hms_deep#c.up50_acs0716_pov100 |    .477616   .9534958     0.50   0.616    -1.392514    2.347746
                                     |
c.hms_deep#c.up50_acs0716_p50homeval |   .3839793   .7632294     0.50   0.615    -1.112974    1.880932
                                     |
 c.hms_deep#c.up50_acs0716_fracblack |  -2.817344   1.099551    -2.56   0.010    -4.973939   -.6607484
                                     |
          c.hms_deep#c.up50_avg_pm25 |   1.628305   1.120541     1.45   0.146     -.569457    3.826067
                                     |
                               _cons |   174.0087   4.847124    35.90   0.000     164.5018    183.5156
------------------------------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------+
    Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------+---------------------------------------|
 fe_countyqtroy |      6900        6900           0    *|
        fe_styr |       631           0         631     |
--------------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

.         summ pc_qwi_payroll [aw=seer_pop] if e(sample)

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
pc_qwi_pay~l |  89,020  1.4686e+10    5587.139   3750.851   534.9928   62888.39

.         local ymean=`r(mean)'

.         regsave using "$Rep_smokelabor/2_analysis/output_tables/table2.dta", addlabel(outcome_mean, "`ymean'") table(col6, `tbl_settings_log') `append'
file C:\Users\ericzou\Dropbox\replicate_smokelabor/2_analysis/output_tables/table2.dta saved

.         local append append

.         
.         preserve 

.         
.                 use "$Rep_smokelabor/2_analysis/output_tables/table2.dta", clear

.                 drop if var == "r2"
(1 observation deleted)

.                 drop if var == "_id"
(0 observations deleted)

.                 drop if strpos(var, "_cons_") > 0
(2 observations deleted)

.                 replace var="observations" if var=="N"
(1 real change made)

.                 drop if _n<=2
(2 observations deleted)

.                 drop if inrange(_n,3,12)
(10 observations deleted)

.                 
.                 ingap 3

.                 ingap 6

.                 ingap 9

.                 ingap 12

.                 ingap 15

.                 ingap 18

.                 list , sep(0)

     +---------------------------------------------------------------------------------------------------------------------+
     |                                         var        col1        col2        col3        col4        col5        col6 |
     |---------------------------------------------------------------------------------------------------------------------|
  1. |                               hms_deep_coef   -5.976***   -5.366***   -5.749***   -4.095***   -6.524***   -6.794*** |
  2. |                             hms_deep_stderr     (0.670)     (0.987)     (0.770)     (1.049)     (1.181)     (1.616) |
  3. |                                                                                                                     |
  4. |      c.hms_deep#c.up50_cen2010_fracurb_coef       0.860                                                      1.244* |
  5. |    c.hms_deep#c.up50_cen2010_fracurb_stderr     (0.631)                                                     (0.688) |
  6. |                                                                                                                     |
  7. |       c.hms_deep#c.up50_acs0716_pov100_coef                   0.343                                           0.478 |
  8. |     c.hms_deep#c.up50_acs0716_pov100_stderr                 (0.886)                                         (0.953) |
  9. |                                                                                                                     |
 10. |   c.hms_deep#c.up50_acs0716_p50homeval_coef                               0.658                               0.384 |
 11. | c.hms_deep#c.up50_acs0716_p50homeval_stderr                             (0.697)                             (0.763) |
 12. |                                                                                                                     |
 13. |    c.hms_deep#c.up50_acs0716_fracblack_coef                                        -2.414**                -2.817** |
 14. |  c.hms_deep#c.up50_acs0716_fracblack_stderr                                         (0.980)                 (1.100) |
 15. |                                                                                                                     |
 16. |             c.hms_deep#c.up50_avg_pm25_coef                                                       1.778       1.628 |
 17. |           c.hms_deep#c.up50_avg_pm25_stderr                                                     (1.180)     (1.121) |
 18. |                                                                                                                     |
 19. |                                observations     160,346     160,346     160,346     160,346      89,020      89,020 |
 20. |                                outcome_mean    5359.656    5359.656    5359.656    5359.656    5587.140    5587.140 |
     +---------------------------------------------------------------------------------------------------------------------+

.                 saveold "$Rep_smokelabor/2_analysis/output_tables/table2.dta", replace
(saving in Stata 13 format)
(FYI, saveold has options version(12) and version(11) that write files in older Stata formats)
file C:\Users\ericzou\Dropbox\replicate_smokelabor/2_analysis/output_tables/table2.dta saved

.         restore 

. 
. log close
      name:  <unnamed>
       log:  C:\Users\ericzou\Dropbox\replicate_smokelabor/2_analysis/output_logs/table2.log
  log type:  text
 closed on:  22 Jun 2022, 17:34:24
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
